#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2015-2019, Intel Corporation

#
# src/test/obj_pool/TEST14 -- unit test for pmemobj_create
#

. ../unittest/unittest.sh

require_test_type medium

setup
umask 0

#
# TEST14 non-existing file, poolsize >= min required size
#        layout string is too long
#
LAYOUT=$(tr -cd '[:alnum:]' < /dev/urandom 2>/dev/null | head -c1024)
[ $(echo $LAYOUT | wc -c) -ne 1025 ] && fatal "'tr' error"

expect_normal_exit ./obj_pool$EXESUFFIX c $DIR/testfile $LAYOUT 20 0640

check_no_files $DIR/testfile

check

pass
